<?php

namespace App\Http\Controllers\Api\V1\User;

use App\Models\User\Users;
use Illuminate\Http\Request;
use App\Http\Controllers\Api\V1\BaseController;
use App\Http\Controllers\Api\V1\TransformerController;

class OrderController extends BaseController
{

    /**
     * show 获取某个用户数据
     * @param $id
     */
    public function show($id)
    {
        $test = Users::find($id);
        // dd($test);
        // return json_encode($test);
        if (!$test) {
            return $this->response->errorNotFound('Test not found');
        }
        return $this->response->array($test->toArray(), new TransformerController());
//        return $this->item($test, new TestsTransformer());
    }
}
